package com.awn.weidian.demo.mapper;
import com.awn.weidian.demo.pojo.Evaluate;

// import com.sun.org.apache.xpath.internal.operations.String;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

import java.util.List;

@Mapper
public interface IEvaluate{

    @Select("select * from goodsevaluate")
    public List<Evaluate> showList();

    @Insert("insert into goodsevaluate (buyerid,gid,evaluatetext) values (#{buyerid},#{gid},#{evaluatetext})")
    public int addUser(Evaluate evaluate);
    
    @Select("select * from goodsevaluate where buyerid=#{aa}")
    public Evaluate findOne(String aa);
    

    @Update("update goodsevaluate set evaluatetext=#{evaluatetext} where buyerid = #{buyerid} and gid = #{gid}")
    public int update(Evaluate evaluate);
    

    @Update("update goodsevaluate set addeva=#{addeva} where buyerid = #{buyerid} and gid = #{gid}")
    public int updatetwo(Evaluate evaluate);


    @Delete("delete from goodsevaluate where buyerid = #{aa}")
    public int deleteUser(String aa);

}